package  
{
	import net.flashpunk.FP;
	import net.flashpunk.graphics.Image;
	import net.flashpunk.graphics.Text;
	import net.flashpunk.World;
	import net.flashpunk.utils.Input;
	import net.flashpunk.utils.Key;
	
	/**
	 * ...
	 * @author Donatello
	 */
	public class MiddleWorld extends World
	{
		
		[Embed(source = "img/help.png" )] private const HELP:Class;
		protected var helpImg:Image;
		
	
	
		private var helpText:Text;
	
		public function MiddleWorld() 
		{
			helpImg = new Image (HELP);
			
			add(new TextMessage("Move the characters in both sides at the same time!!",180,50));
			add(new TextMessage("Jump over the platfomrs and don't fall!",230,100));
			add(new TextMessage("Dodge the Fireballs!", 300, 150));
			add(new TextMessage("W/A/D to Move", 100, 280));
			add(new TextMessage("Arrow Keys to Move", 500, 280));
			
			helpText = new Text("Press S to skip! ");
			helpText.x = 550;
			helpText.y = 600;
			this.addGraphic(helpText);
			
						
			helpImg.x = 0;
			helpImg.y = 300;
			
			addGraphic(helpImg);
			
			
		}
		
		
		override public function update():void
		{
			
	
			if (Input.check(Key.S) )
			{
				FP.world = new GameWorld();
				removeAll();
					
			}
			
				
			
			super.update()
		}
		
	}

}